package main

import "fmt"

type currency int

func main() {
	q := [...]int{1, 2, 3}
	fmt.Println(q)

	const (
		USD currency = iota
		EUR
		GBP
		RMB
	)
	symbol := [...]string{USD: "$", EUR: "€", GBP: "￡", RMB: "￥"}
	fmt.Println(RMB, symbol[RMB])

	r := [...]int{99: -1}
	fmt.Println(r)

	a := [2]int{1, 2}
	b := [...]int{1, 2}
	c := [2]int{1, 3}
	fmt.Println(a == b, a == c, b == c)

	//d := [3]int{1, 2}
	//fmt.Println(a == d) //编译报错

	array := [32]byte{1, 2, 3, 4, 5}
	fmt.Println(array)
	zero(&array)
	fmt.Println(array)
}

func zero(ptr *[32]byte) {
	*ptr = [32]byte{}
}
